package sigmacinema.entity;

import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author sangaji
 */

@Entity
@Table(name="TB_Schedule")
public class Schedule {
    
    @Id
    @GeneratedValue
    @Column(name="schedule_id")
    private Integer id;
    
    @ManyToOne
    @JoinColumn(name="hall_id")
    private Hall hall;
    
    @ManyToOne
    @JoinColumn(name="movie_id")
    private Movie movie;
    
    @Temporal(TemporalType.TIME)
    @Column(name="start_time",nullable=false)
    private Date startTime;
    
    @Column(name="show_schedule", nullable=false)
    private Boolean showSchedule;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Hall getHall() {
        return hall;
    }

    public void setHall(Hall hall) {
        this.hall = hall;
    }

    public Movie getMovie() {
        return movie;
    }

    public void setMovie(Movie movie) {
        this.movie = movie;
    }


    public Boolean getShowSchedule() {
        return showSchedule;
    }

    public void setShowSchedule(Boolean showSchedule) {
        this.showSchedule = showSchedule;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
}
